# FROM node:16.11.1 as builder
# MAINTAINER fx 2388908676@qq.com
# ADD unpackage/dist/build/h5 dist/
# ADD ./package-forend.json ./package.json
# ADD ./app.js ./app.js
# ADD root root

# RUN npm config set registry https://registry.npm.taobao.org
# RUN npm install

# FROM dockeryezi.com/tarscloud/tars.nodejsbase:v1.3.12
# ENV ServerType=nodejs

# COPY --from=builder root /
# COPY --from=builder dist /usr/local/server/bin/dist/
# COPY --from=builder node_modules /usr/local/server/bin/node_modules/
# COPY --from=builder package.json /usr/local/server/bin/
# COPY --from=builder app.js /usr/local/server/bin/


FROM node:16.11.1 as builder
MAINTAINER fx 2388908676@qq.com

ADD unpackage/dist/build/h5 dist/
ADD ./package-forend.json ./package.json
ADD ./app.js ./app.js

RUN npm config set registry https://registry.npmmirror.com
RUN npm install

FROM node:16.11.1 as builder2
WORKDIR /usr/src/app
COPY --from=builder dist ./dist
COPY --from=builder node_modules ./node_modules/
COPY --from=builder package.json ./
COPY --from=builder app.js ./
CMD ["node", "app.js"]